package com.sky.mapper;

import com.sky.entity.Story;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface StoryMapper {


    /**
     * 根据用户id查故事
     * @param userId
     * @return
     */
    List<Story> getByUserId(Long userId);

    /**
     * 根据id删除故事
     * @param id
     */
    @Delete("delete from abeibei_story.story where id=#{id}")
    void deleteById(Long id);
}
